package LuMin.file.Text;

import java.io.*;

/**
 * @author lumin
 * @date 2022/05/09 20:49
 **/
public class text2 {
    public static void main(String[] args) throws IOException{
        try(InputStream is = new FileInputStream("src.jpg")){
            try(OutputStream os = new FileOutputStream("derc.jpg")){
                byte[] buf = new byte[1024];
                while (true){
                    int n = is.read(buf);
                    if(n == -1){
                        break;
                    }

                    os.write(buf,0,n);
                }

                os.flush();
            }
        }
    }
}